﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BeatingMole
{
    /// <summary>
    /// Nguyễn Đặng Anh Duy
    /// MSSV : 11100204
    /// Email : itc.anhduy@gmail.com
    /// <summary>
    class CGuiPlayer
    {
        #region "Variable"
        ContentManager _Content;
        bool IsEnable;
        #endregion

        #region "Bus"
        CBusPlayer BusPlayer;
        #endregion

        #region "Properties"
        public bool IsEnableGui
        {
            set { IsEnable = value; }
            get { return IsEnable; }
        }
        #endregion

        #region "Constructor"
        public CGuiPlayer(ContentManager content)
        {
            _Content = content;
            BusPlayer = new CBusPlayer(_Content);
        }
        #endregion

        #region "Method"
        public void UpdatePlayer(GameTime gameTime)
        {
            if (IsEnable == true)
            {
                BusPlayer.UpdatePlayer(gameTime);
            }
        }

        public void DrawPlayer(SpriteBatch spriteBatch)
        {
            if (IsEnable == true)
            {
                BusPlayer.DrawPlayer(spriteBatch);
                BusPlayer.DrawNamePlayer(spriteBatch);
                BusPlayer.DrawScorePlayer(spriteBatch);
            }
        }
        #endregion
    }
}
